<?php

class Soul_Template_Html_Form_File extends Soul_Template_Html_Form_Input {
	
    public function __construct() {
        $this->templateName = 'form/file';
        $this->addClass('input', 'file');
    }

    protected function renderReadonly() {
        return '';
    }

    protected function renderEditable() {
        if (!$this->getEnabled()) {
            $this->addClass('disabled');
        }
        $this->setAttribute('type', 'file')
                ->setAttribute('id', $this->getId())
                ->setAttribute('name', $this->getName());
        if (!$this->getEnabled()) {
            $this->setAttribute('disabled', 'disabled');
        }
        return '<input ' . $this->getAttributeHtml() . '/>';
    }

}